<template>
  <div>
    <Card :bordered="false" dis-hover class="ivu-mt">
      <Tabs :value="tabName" @on-click="changeTab">
        <TabPane label="表单" name="formTable"
          ><formTable ref="formTable"
        /></TabPane>
        <TabPane label="表单模板配置" name="formTemplate"
          ><formTemplate ref="formTemplate"
        /></TabPane>
      </Tabs>
    </Card>
  </div>
</template>
<script>
import formTable from "./form";
import formTemplate from "./formtemplate";
export default {
  name: "clueset",
  components: { formTable, formTemplate },
  data() {
    return {
      tabName: "formTable",
    };
  },
  mounted() {
    this.$refs[this.tabName].getData();
  },
  methods: {
    changeTab(e) {
      this.tabName = e;
      this.$refs[this.tabName].getData();
    },
  },
};
</script>
